import Vue from 'vue'
import App from './App.vue'
import router from './router'
import Vant from 'vant'
import http from './utils/http'
import request from './utils/request'
import 'amfe-flexible'
// require('../mock')

import '@/styles/index.less'

import VueAwesomeSwiper from 'vue-awesome-swiper';
// import 'swiper/dist/css/swiper.css';
Vue.use(VueAwesomeSwiper)

// import VConsole from 'vconsole/dist/vconsole.min.js'
// let vConsole = new VConsole()



// 判断机型   ios >>> isiOS   android >>> isAndroid
Vue.prototype.$mobilePhoneModel = mobilePhoneModel()
function mobilePhoneModel() {
  const u = navigator.userAgent
  const isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)
  const isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1 // android终端
  if (isiOS) return 'isiOS'
  if (isAndroid) return 'isAnd'
}



Vue.config.productionTip = false
if (process.env.NODE_ENV == 'production') {
  Vue.prototype.$http = request
} else {
  Vue.prototype.$http = http
}

Vue.use(Vant)

import '@vant/touch-emulator'

var vue = new Vue({
  router,
  render: h => h(App)
}).$mount('#app')

export default vue